<?php
//require_once('../config/auth.php');
require_once('../guard/guard.cl.php');
$__CURRENT_PAGE__ = 'index';
$__TITLE__ = "Gestion des gardes";

$guard = new Guard();
$serviceId = empty($_GET['service_id']) ? 0 : $_GET['service_id'];
$startDate = empty($_GET['start_date']) ? date("Y").'-01-01' : $_GET['start_date'];
$endDate = empty($_GET['end_date']) ? date("Y").'-12-31' : $_GET['end_date'];
$type = empty($_GET['type']) ? '' : $_GET['type'];
$guards = $guard->getGuardByServiceAndTypeAndDate($serviceId, $type, array('start_date'=>$startDate, 'end_date'=>$endDate));
